package gson.emlog.utils;

import gson.emlog.R;

import java.util.ArrayList;
import java.util.HashMap;

import android.content.res.Resources;

public class Menu {

	private static ArrayList<HashMap<String, Object>> meumList;

	private static Menu menu = null;

	private Menu() {
		
	}

	public static synchronized Menu getInstance(Resources rs) {
		if (menu == null) {
			menu = new Menu();
			InitMenu(rs);
		}
		return menu;
	}

	public ArrayList<HashMap<String, Object>> getMenu() {
		return meumList;
	}

	private static void InitMenu(Resources rs) {
		meumList = new ArrayList<HashMap<String,Object>>();
		
		/*HashMap<String, Object> logs = new HashMap<String, Object>();
		logs.put("icon", R.drawable.logs);
		logs.put("text", rs.getString(R.string.logs));
		meumList.add(logs);*/

		HashMap<String, Object> twitter = new HashMap<String, Object>();
		twitter.put("icon", R.drawable.twitter);
		twitter.put("text", rs.getString(R.string.twitter));
		meumList.add(twitter);

		/*HashMap<String, Object> sort = new HashMap<String, Object>();
		sort.put("icon",  R.drawable.sort);
		sort.put("text", rs.getString(R.string.sort));
		meumList.add(sort);*/

		HashMap<String, Object> comment = new HashMap<String, Object>();
		comment.put("icon", R.drawable.comment);
		comment.put("text", rs.getString(R.string.comment));
		meumList.add(comment);

		/*HashMap<String, Object> flink = new HashMap<String, Object>();
		flink.put("icon", R.drawable.flink);
		flink.put("text", rs.getString(R.string.flink));
		meumList.add(flink);*/

		HashMap<String, Object> cloud = new HashMap<String, Object>();
		cloud.put("icon", R.drawable.cloud);
		cloud.put("text", rs.getString(R.string.cloud));
		meumList.add(cloud);
		
		HashMap<String, Object> setting = new HashMap<String, Object>();
		setting.put("icon", R.drawable.setting);
		setting.put("text", rs.getString(R.string.setting));
		meumList.add(setting);
	}
}
